package com.huike.report.mapper;

import java.util.List;
import java.util.Map;

import com.huike.clues.domain.TbCourse;
import com.huike.report.domain.vo.CluesStatisticsPO;
import com.huike.report.domain.vo.SubjectStatisticsVo;
import org.apache.ibatis.annotations.Param;

import com.huike.clues.domain.vo.IndexStatisticsVo;
import org.springframework.stereotype.Repository;

/**
 * 首页统计分析的Mapper
 * @author Administrator
 *
 */

public interface ReportMapper {
	/**=========================================基本数据========================================*/
	/**
	 * 获取线索数量
	 * @param beginCreateTime	开始时间
	 * @param endCreateTime		结束时间
	 * @param username			用户名
	 * @return
	 */
	Integer getCluesNum(@Param("startTime") String beginCreateTime,
						@Param("endTime") String endCreateTime,
						@Param("username") String username);

	/**
	 * 获取商机数量
	 * @param beginCreateTime	开始时间
	 * @param endCreateTime		结束时间
	 * @param username			用户名
	 * @return
	 */
	Integer getBusinessNum(@Param("startTime") String beginCreateTime,
						   @Param("endTime") String endCreateTime,
						   @Param("username") String username);

	/**
	 * 获取合同数量
	 * @param beginCreateTime	开始时间
	 * @param endCreateTime		结束时间
	 * @param username			用户名
	 * @return
	 */
	Integer getContractNum(@Param("startTime") String beginCreateTime,
						   @Param("endTime") String endCreateTime,
						   @Param("username") String username);

	/**
	 * 获取合同金额
	 * @param beginCreateTime	开始时间
	 * @param endCreateTime		结束时间
	 * @param username			用户名
	 * @return
	 */
	Double getSalesAmount(@Param("startTime") String beginCreateTime,
						  @Param("endTime") String endCreateTime,
						  @Param("username") String username);

	Integer getTodayCluesNum(
			@Param("username")String username,
			@Param("today")String today);

	Integer getTodayBusinessNum(@Param("username")String username,
							   @Param("today")String today);

	Integer getTodayContractNum(@Param("username")String username,
								@Param("today")String today);

	Double getTodaySalesAmount(@Param("username")String username,
							   @Param("today")String today);

	Integer getWaitCluesNum(@Param("username")String username,
							@Param("beginCreateTime")String beginCreateTime,
							@Param("endCreateTime")String endCreateTime);

	Integer getWaitBusinessNum(@Param("username")String username,
							   @Param("beginCreateTime") String beginCreateTime,
							   @Param("endCreateTime")String endCreateTime);

	Integer getAllCluesNum(@Param("username")String username,
						   @Param("beginCreateTime") String beginCreateTime,
						   @Param("endCreateTime") String endCreateTime);

	Integer getAllBusinessNum(@Param("username")String username,
							  @Param("beginCreateTime") String beginCreateTime,
							  @Param("endCreateTime")String endCreateTime);

	List<SubjectStatisticsVo> subjectStatistics(@Param("beginCreateTime")
														String beginCreateTime,
												@Param("endCreateTime")
												String endCreateTime);

	List<CluesStatisticsPO> getCluesStatistics(
			@Param("beginCreateTime")String beginCreateTime,
			@Param("endCreateTime")String endCreateTime);

	Integer StatisticsClue(String date);


	/**=========================================今日简报========================================*/



	/**=========================================待办========================================*/

}
